package com.jacky.me.plugin.ui.hook.step3;

import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

import com.jacky.me.plugin.R;
import com.jacky.me.plugin.framework.BaseActivity;

/**
 * Created by jacky on 2017/4/6.
 * banker devel0per
 * <p></p>
 */
public class HookViewClickActivity extends BaseActivity {
    private Button btn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_hook_view);
        final View btn = findViewById(R.id.btn);

        btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.e("HookViewClickActivity", "Button 被点击了");
            }
        });

        getWindow().getDecorView().post(new Runnable() {
            @Override
            public void run() {
                HookViewClickUtil.hookView(btn);
            }
        });
    }

}
